load("@fbsource//tools/build_defs:rust_binary.bzl", "rust_binary")

oncall("scm_server_infra")

rust_binary(
    name = "statistics_collector",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "."},
    named_deps = {
        "futures_ext": "//common/rust/shed/futures_01_ext:futures_01_ext",
    },
    test_deps = [
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobrepo:blobrepo_hg",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/blobstore:redactedblobstore",
        "//eden/mononoke/cmdlib/mononoke_app:mononoke_app",
        "//eden/mononoke/cmdlib/sharding:executor_lib",
        "//eden/mononoke/cmdlib/sharding_ext:sharding_ext",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/repo_attributes/bookmarks:bookmarks",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/filestore:filestore",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/server/context:context",
    ],
)
